package com.dawn.interestmanage.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;

import com.dawn.interestmanage.bean.InterestinfoBean;
import com.dawn.interestmanage.bean.UserinterestBean;
 

@Repository
public class UserinterestDao {
	@Autowired
    private HibernateTemplate hibernateTemplate;

	  
    public List<UserinterestBean> findInterByUserId(int userId){
        @SuppressWarnings("unchecked")
        List<UserinterestBean> interests = (List<UserinterestBean>) hibernateTemplate.find("from UserinterestBean ui where ui.userId = ?", userId);
        return interests;
    }
    
  
    
    
}
